<template>
  <div class="string-content">
    <editor :key="this.$store.state.editorRandKey" v-if="this.$store.state.redisData.content !== ''"></editor>
  </div>
</template>

<script>
import editor from "@/views/content/editor/editor";

export default {
  name: "string_content",
  components: {
    editor
  },
  data() {
    return {
      params: '',
      randKey: new Date().getTime()
    }
  },
  created() {
    this.params = this.$route.params.key
    this.$store.state.redisData.content = JSON.stringify({"version": "1.1." + this.params})
  },
  methods: {}
}
</script>

<style scoped lang="less">
.string-content {
  width: 100%;
  height: 100%;
  text-align: left;
}
</style>